﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Common;

namespace Ex05
{
    /// <summary>
    /// A Basic Query
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            string[] names = { "Tom", "Dick", "Harry", "Mary", "Jay" };

            IEnumerable<string> query =
                from n in names


                where n.Contains("a")   // Filter elements


                orderby n.Length           // Sort elements


                select n.ToUpper();   // Translate each element (project)

            query.Dump();
            Console.ReadKey();
        }
    }
}
